import React,{Component} from 'react'

export default class Son extends Component{
    render(){
        const {doSometing,doneSometing,deleteSomeTing,AddDoSomeTing,children} = this.props
       
        return <div>
                {children[0]}

                {
                    doSometing.map((item,key)=>{
                        return <div key={key}>
                                    {item}
                                    <button onClick={()=>deleteSomeTing('doSometing',key)}>删除</button>
                                    <button onClick={()=>AddDoSomeTing('do_done',key)}>已完成</button>
                                </div>
                    })
                }
                {children[1]}
                {
                    doneSometing.map((item,key)=>{
                        return <div key={key}>
                                    {item}
                                    <button onClick={()=>deleteSomeTing('doneSometing',key)}>删除</button>
                                    <button onClick={()=>AddDoSomeTing('done_do',key)}>未完成</button>
                                </div>
                    })
                }
        </div>
    }
}